package com.ruoyi.pay;

import com.ruoyi.pay.model.PayNotifyResultModel;
import com.ruoyi.pay.model.PayRequestModel;
import com.ruoyi.pay.model.PayResultModel;

import java.util.Map;

/**
 * 支付服务
 */
public interface PayService {
    /**
     * 支付
     * @param payRequestModel
     * @return
     */
     PayResultModel pay(PayRequestModel payRequestModel);

    /**
     * 回调处理
     * @param params 微信处理方式：String xmlMsg = HttpKit.readData(HttpServletRequest );
     *               params=WxPayKit.xmlToMap(xmlMsg);
     *               支付宝处理方式：Map<String, String> params = AliPayApi.toMap(HttpServletRequest);
     * @param appId
     * @return
     */
    PayNotifyResultModel payNotify(Map<String, String> params, String appId);
}
